import request from '@/utils/request'

/**
 * 获取多个下拉选项集合
 * @param {Array<object>} arr
 * @param {string} arr.object.key key
 * @param {string} arr.object.category 分类
 * @returns {Array<object>}
 */
export function getMultiSelectCollection(arr) {
  return request({
    url: '/common/GetSelectCollection',
    method: 'post',
    data: arr,
  })
}

/**
 * 获取单个下拉选项集合
 * @param {string} key
 * @param {string} category
 * @returns 下拉选项
 */
export function getSelectCollection(key, category, args) {
  var params = {
    key: key,
    category: category,
  }
  args = args || {}
  return request({
    url: '/common/getSelectByQuery',
    method: 'post',
    data: args,
    params,
  })
}

/**
 * 分页获取数据
 * @param {*} params
 * @returns
 */
export function getOpLogPageList(params) {
  return request({
    url: '/common/GetOpLogPageList',
    method: 'post',
    data: params,
  })
}
